package com.xk857.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 星空小屋-知识点表
 *
 * @author CV大魔王
 * @since 2021-02-21
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("xk857_label")
@ApiModel(value = "Label对象", description = "星空小屋-知识点表")
public class Label implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "模块id")
    private String categoryId;

    @ApiModelProperty(value = "知识点名称")
    private String name;

    @ApiModelProperty(value = "描述信息")
    private String remark;

    @ApiModelProperty(value = "知识点图片")
    private String titleImg;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "创建时间")
    private Date createDate;

    @ApiModelProperty(value = "更新时间")
    private Date updateDate;

    @ApiModelProperty(value = "模块名称")
    @TableField(exist = false) // 不是 xk_label 表中字段
    private String categoryName;

    @ApiModelProperty(value = "标签下文章数量")
    @TableField(exist = false) // 不是 xk_label 表中字段
    private int acount;

}
